#include<stdio.h>
 
int main()
{
    int i,j;
 
    char days[12][10] = 
    {
        "First",
        "Second",
        "Third",
        "Fourth",
        "Fifth",
        "Sixth",
        "Seventh",
        "Eighth",
        "Ninth",
        "Tenth",
        "Eleventh",
        "Twelfth"
    };

    char gifts[12][27] =
    {
	"A Partridge in a Pear Tree",
        "Two Turtle Doves and",
        "Three French Hens",
        "Four Calling Birds",
        "Five Golden Rings",
        "Six Geese a Laying",
        "Seven Swans a Swimming",
        "Eight Maids a Milking",
        "Nine Ladies Dancing",
        "Ten Lords a Leaping",
        "Eleven Pipers Piping",
        "Twelve Drummers Drumming"
    };
 
    for(i=0;i<12;i++)
    {
        printf("On the %s day of Christmas,\n",days[i]);
        printf("My true love gave to me:\n");
 
        for(j=i;j>=0;j--)
        {
            //(i==0)?printf("\nA partridge in a pear tree."):printf("%s",gifts[11-j],(j!=0)?',':' ');
	    printf("%s\n", gifts[j]);
        }
	printf("\n");
    }
 
    return 0;
}
